package com.attendance.manage.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.attendance.common.annotation.Excel;
import com.attendance.common.core.domain.BaseEntity;

/**
 * 考勤记录对象 attendance
 *
 * @author ruoyi
 * @date 2025-11-01
 */
public class Attendance extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    private Long id;

    /** 关联用户ID */
    @Excel(name = "关联用户ID")
    private Long userId;

    /** 用户名 */
    @Excel(name = "用户名")
    private String username;

    /** 上班打卡时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "上班打卡时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date clockInTime;

    /** 下班打卡时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "下班打卡时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date clockOutTime;

    /** 状态：正常/迟到/早退 */
    @Excel(name = "状态：正常/迟到/早退")
    private String status;

    /** 打卡日期（YYYY-MM-DD） */
    @Excel(name = "打卡日期", readConverterExp = "Y=YYY-MM-DD")
    private Date createDate;

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }

    public void setUserId(Long userId)
    {
        this.userId = userId;
    }

    public Long getUserId()
    {
        return userId;
    }

    public void setUsername(String username)
    {
        this.username = username;
    }

    public String getUsername()
    {
        return username;
    }

    public void setClockInTime(Date clockInTime)
    {
        this.clockInTime = clockInTime;
    }

    public Date getClockInTime()
    {
        return clockInTime;
    }

    public void setClockOutTime(Date clockOutTime)
    {
        this.clockOutTime = clockOutTime;
    }

    public Date getClockOutTime()
    {
        return clockOutTime;
    }

    public void setStatus(String status)
    {
        this.status = status;
    }

    public String getStatus()
    {
        return status;
    }

    public void setCreateDate(Date createDate)
    {
        this.createDate = createDate;
    }

    public Date getCreateDate()
    {
        return createDate;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("userId", getUserId())
                .append("username", getUsername())
                .append("clockInTime", getClockInTime())
                .append("clockOutTime", getClockOutTime())
                .append("status", getStatus())
                .append("createDate", getCreateDate())
                .append("createTime", getCreateTime())
                .toString();
    }
}

